home *** CD-ROM | disk | FTP | other *** search
- cumprod:
-
- Syntax: cumprod ( A )
-
- Description:
-
- cumprod computes the running, or cumulative product of the
- input, A. If the input is a rectangular matrix, then the
- cumulative product is performed over the columns of the
- matrix.
-
- Example:
-
- > a=1:4
- a =
- 1 2 3 4
- > cumprod (a)
- 1 2 6 24
- > a = [1,2,3;4,5,6;7,8,9]
- a =
- 1 2 3
- 4 5 6
- 7 8 9
- > cumprod (a)
- 1 2 3
- 4 10 18
- 28 80 162
-
- See Also: cumsum, prod, sum
-